<template>
    <div>
        我是子组件--{{ temp.visible }}
        <slot name="test"></slot>
    </div>
</template>

<script setup lang="ts">
import { ref, watch , onMounted ,defineProps,reactive,defineExpose} from 'vue'
let test = "3434"
interface Props {
    visible: boolean;
    data:any
}
let temp = withDefaults(defineProps<Props>(), {
    visible: false,
    data: () => {
      return {
        data: [{ name: 'xxx.mp4' }],
      };
    },
});
defineExpose({
    visible:test
});
</script>

<style scoped>

</style>